-
Notifications
You must be signed in to change notification settings - Fork 58
Non uniform for everything! #177
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
d64dd36
to
ea25c7e
Compare
I wonder if we should land this behind an off-by-default flag? Or maybe that is more trouble than it is worth. |
I'm shocked I haven't thought of this earlier... then I wouldn't have to keep updating this PR constantly |
@LegNeato Buffers are easy, but for images, we can't just asm! {
// error[E0658]: attributes on expressions are experimental
// error: removing an expression is not supported in this position
#[cfg(feature = "non-uniform")]
"OpDecorate %image NonUniform"
...
} We can't put it in a separate Would you mind if I just add a linking stage instead to remove all |
I'm personally fine with either a linking stage or copying 200 lines (or a macro so no need to copy?) |
…e decoration during linking if undesired
…nUniform` capability is enabled
I've taken the linking stage filter route and added the I've added some tests in branch |
Adds the NonUniform declaration to pretty much everything I could think of, even if it's not required. I don't think this will have a huge performance impact, as Nvidia and Intel don't seem to care about this flag, their accesses are always non-uniform, and Amd's driver is really good at figuring out whether something is uniform / scalar across the workgroup / subgroup or not.
To have NonUniform declared everywhere, you just need to enable it's associated capability:
SpirvBuilder::capability(Capability::ShaderNonUniform)
closes #120